﻿using System;
using System.Text;

class VariousEncodings
{

    public static void ConvertAndPrint(string input,string outEncodingName)
    {
        Encoding outEncoding = Encoding.GetEncoding(outEncodingName);
        byte[] bytes = Encoding.Default.GetBytes(input);
        byte[] outBytes = Encoding.Convert(Encoding.Default, outEncoding, bytes);
        foreach (byte b in outBytes)
        {
            Console.Write("0x{0:X} ", b);
        }
        Console.WriteLine();

        string outString = outEncoding.GetString(outBytes);
        Console.WriteLine(outString);
    }

    static void Main(string[] args)
    {
        string input = Console.ReadLine();
        ConvertAndPrint(input,"UTF-8");
        ConvertAndPrint(input, "ASCII");
        ConvertAndPrint(input, "Unicode");
        ConvertAndPrint(input, "Windows-1251");
    }
}
